#include "dice.h"
#include <QDebug>

Dice::Dice(Dice::Type size, QObject *parent) :
    QObject(parent)
{
    _size = size;
    _value = 1;
}

void Dice::roll()
{
    _value = qrand() % _size + 1;
    emit valueChanged(_size);
    qDebug() << "New value=" << _value;
}
